From: Jasper St. Pierre Date: Mon, 4 Nov 2013 19:16:28 +0000 (-0500) Subject: messageTray: Simplify code X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3074 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=143dfb62466ed9b2639a3e7d5fa1ae43af26a460;p=gnome-shell.git messageTray: Simplify code If notificationRemoved, then mustClose is true, so we don't need to double-check for this. --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 1e891faec..19599441a 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2373,7 +2373,6 @@ const MessageTray = new Lang.Class({ this._showNotification(); } } else if (this._notificationState == State.SHOWN) { - let pinned = this._pointerInNotification && !this._notificationRemoved; let expired = (this._userActiveWhileNotificationShown && this._notificationTimeoutId == 0 && !(this._notification.urgency == Urgency.CRITICAL) && @@ -2384,9 +2383,9 @@ const MessageTray = new Lang.Class({ if (mustClose) { let animate = hasNotifications && !this._notificationRemoved; this._hideNotification(animate); - } else if (pinned && !this._notification.expanded) { + } else if (this._pointerInNotification && !this._notification.expanded) { this._expandNotification(false); - } else if (pinned) { + } else if (this._pointerInNotification) { this._ensureNotificationFocused(); } }